
import { ICapability } from "@/components/capability";
import React from "react";
import { useNavigate } from "react-router-dom";
import { v4 as uuidv4 } from 'uuid';

/** 模块详情 */
export function useModulesDetails(record): ICapability {

    const navigate = useNavigate();

    const onStart = React.useCallback(() => {
        navigate('../modulesDetails?id=' + record.id)
    }, [record.id, navigate])

    return {
        id: uuidv4(),
        title: '详情',
        onStart,
    }
}